package com.ruoyi.fs.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fs.mapper.FsEntrustMapper;
import com.ruoyi.fs.domain.FsEntrust;
import com.ruoyi.fs.service.IFsEntrustService;

/**
 * 委托方Service业务层处理
 * 
 * @author hero
 * @date 2024-10-14
 */
@Service
public class FsEntrustServiceImpl implements IFsEntrustService 
{
    @Autowired
    private FsEntrustMapper fsEntrustMapper;

    /**
     * 查询委托方
     * 
     * @param id 委托方主键
     * @return 委托方
     */
    @Override
    public FsEntrust selectFsEntrustById(Long id)
    {
        return fsEntrustMapper.selectFsEntrustById(id);
    }

    /**
     * 查询委托方列表
     * 
     * @param fsEntrust 委托方
     * @return 委托方
     */
    @Override
    public List<FsEntrust> selectFsEntrustList(FsEntrust fsEntrust)
    {
        return fsEntrustMapper.selectFsEntrustList(fsEntrust);
    }

    /**
     * 新增委托方
     * 
     * @param fsEntrust 委托方
     * @return 结果
     */
    @Override
    public int insertFsEntrust(FsEntrust fsEntrust)
    {
        fsEntrust.setCreateTime(DateUtils.getNowDate());
        return fsEntrustMapper.insertFsEntrust(fsEntrust);
    }

    /**
     * 修改委托方
     * 
     * @param fsEntrust 委托方
     * @return 结果
     */
    @Override
    public int updateFsEntrust(FsEntrust fsEntrust)
    {
        fsEntrust.setUpdateTime(DateUtils.getNowDate());
        return fsEntrustMapper.updateFsEntrust(fsEntrust);
    }

    /**
     * 批量删除委托方
     * 
     * @param ids 需要删除的委托方主键
     * @return 结果
     */
    @Override
    public int deleteFsEntrustByIds(Long[] ids)
    {
        return fsEntrustMapper.deleteFsEntrustByIds(ids);
    }

    /**
     * 删除委托方信息
     * 
     * @param id 委托方主键
     * @return 结果
     */
    @Override
    public int deleteFsEntrustById(Long id)
    {
        return fsEntrustMapper.deleteFsEntrustById(id);
    }
}
